<extend name="Public:base" />
<block name="content">
<div id="primary" class="inner group">
   <div class="layout-sidebar-right group">
      <!-- START CONTENT -->
      <div id="content" role="main" class="group">
         <h2 id="">Edit My Address</h2>
         <div id="post-16" class="post-16 page type-page status-publish hentry group">
           
            <table id="my_table" style="width:100%" cellpadding="0" cellspacing="0" class="short-table grey">
               <thead>
                  <tr>
                     <th style="width:15%">姓名</th>
                     <th style="width:20%">地址</th>
                     <th style="width:15%">地址备注</th>
                     <th style="width:15%">电话</th>
                     <th style="width:15%">默认地址</th>
                     <th style="width:40%">用户操作</th>
                  </tr>
               </thead>
               <tbody>
                    <foreach name="list" item="address">
                        <tr>
                            <th class="features" style="text-align:center; ">{$address.name}</th>
                            <td style="text-align:center; ">{$address.zhuzhi}</td>
                            <td style="text-align:center; ">{$address.zhuzhizhushi}</td>
                            <td style="text-align:center; ">{$address.phone}</td>
                            <td style="text-align:center; ">
                                <a href="" info="moren" aid="{$address.id}" class="read-more">设为默认</a>
                                <img info="moren" status="{$address.status}" src="__PUBLIC__/home/images/bg/yes.png" alt="" style="display:none">
                            </td>
                            <td>
                                <a href="" aid="{$address.id}" info="xiugai" jingdu="{$address.jingdu}" weidu="{$address.weidu}" class="read-more">修改</a>
                                <a href="" aid="{$address.id}" info="shanchu" class="read-more">删除</a>
                            </td>
                        </tr>
                    </foreach>
               </tbody>
            </table>



               <h3>添加新地址</h3>
                <a info="tianjia" class="more-button more-button-rtl" href="#" title="your text">添加新地址 <span class="icon download">&nbsp;</span></a>

	<section class="lx_center1" style="display:none">

	<div class="dt" style="height:345px;">

    	<div id="allmap" style="height:345px;overflow: hidden; position: relative; z-index: 0; color: rgb(0, 0, 0); text-align: left; background-color: rgb(243, 241, 236);">

		<div style="overflow: visible; position: absolute; z-index: 0; left: 0px; top: 36px; cursor: url(http://api0.map.bdimg.com/images/openhand.cur) 8 8, default;">

		<div class="BMap_mask" style="position: absolute; left: 0px; top: -36px; z-index: 9; overflow: hidden; -webkit-user-select: none; width: 1903px; height: 500px;"></div>

		<div style="position: absolute; height: 0px; width: 0px; left: 0px; top: 0px; z-index: 200;">

		<div style="position: absolute; height: 0px; width: auto; left: 0px; top: 0px; z-index: 800;">

		<div class="BMapLib_SearchInfoWindow" id="BMapLib_SearchInfoWindow0" style="width: 300px; -webkit-user-select: none; bottom: -193px; left: 837px;">

		<div class="BMapLib_bubble_top"><div class="BMapLib_bubble_title" id="BMapLib_bubble_title0"></div>

		<div class="BMapLib_bubble_tools"><div class="BMapLib_bubble_close" title="关闭" id="BMapLib_bubble_close0"></div>

		<div class="BMapLib_sendToPhone" title="发送到手机" id="BMapLib_sendToPhone0"></div></div></div>

		<div class="BMapLib_bubble_center">

		<div class="BMapLib_bubble_content" id="BMapLib_bubble_content0" style="height: 105px;">

		<div style="margin:0;line-height:20px;padding:2px;line-height:30px;">

		<img src="images/LOGO.jpg" alt="" style="float:right;zoom:1;overflow:hidden;width:100px;height:100px;margin-left:3px;">

		<br></div></div>

    		<div class="BMapLib_nav" id="BMapLib_nav0">

        		<ul class="BMapLib_nav_tab" id="BMapLib_nav_tab0">

        		<li class="BMapLib_current BMapLib_first" id="BMapLib_tab_search0" style="display: block; width: 99px;">

        		<span class="BMapLib_icon BMapLib_icon_nbs"></span>在附近找</li>

        		<li class="" id="BMapLib_tab_tohere0" style="display: block; width: 99px;"><span class="BMapLib_icon BMapLib_icon_tohere"></span>到这里去</li>

        		<li class="" id="BMapLib_tab_fromhere0" style="display: block; width: 100px;"><span class="BMapLib_icon BMapLib_icon_fromhere"></span>从这里出发</li>

        		</ul>

        		<ul class="BMapLib_nav_tab_content">
                    <li id="BMapLib_searchBox0" style="display: block;">
                        <table width="100%" align="center" border="0" cellpadding="0" cellspacing="0">
                            <tbody>
                                <tr>
                                    <td style="padding-left:8px;">
                                        <input id="BMapLib_search_text0" class="BMapLib_search_text" type="text" maxlength="100" autocomplete="off">
                                    </td>
                                    <td width="55" style="padding-left:7px;">
                                        <input id="BMapLib_search_nb_btn0" type="submit" value="搜索" class="iw_bt">
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </li>
                    <li id="BMapLib_transBox0" style="display:none">
                        <table width="100%" align="center" border="0" cellpadding="0" cellspacing="0">
                            <tbody>
                                <tr>
                                    <td width="30" style="padding-left:8px;">
                                        <div id="BMapLib_stationText0">起点</div>
                                    </td>
                                    <td>
                                        <input id="BMapLib_trans_text0" class="BMapLib_trans_text" type="text" maxlength="100" autocomplete="off">
                                    </td>
                                    <td width="106" style="padding-left:7px;">
                                        <input id="BMapLib_search_bus_btn0" type="button" value="公交" class="iw_bt" style="margin-right:5px;">
                                        <input id="BMapLib_search_drive_btn0" type="button" class="iw_bt" value="驾车">
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </li>
                </ul>
            </div>
        </div>
        <div class="BMapLib_bubble_bottom">
            
        </div>
            <img src="images/iw_tail.png" width="58" height="31" alt="" class="BMapLib_trans" id="BMapLib_trans0" style="left: 120px; top: 218px;">
        </div>
        </div>
        <div style="position: absolute; height: 0px; width: 0px; left: 0px; top: 0px; z-index: 700;">
        <span class="BMap_Marker BMap_noprint" unselectable="on" "="" style="position: absolute; padding: 0px; margin: 0px; border: 0px; cursor: pointer; width: 19px; height: 25px; left: 950px; top: 225px; z-index: -6945250; background: url(http://api0.map.bdimg.com/images/blank.gif);" title="">
        </span>
        <span class="BMap_Marker BMap_noprint" unselectable="on" "="" style="position: absolute; padding: 0px; margin: 0px; border: 0px; cursor: pointer; width: 18px; height: 18px; left: 575px; top: 106px; z-index: 19000000; -webkit-user-select: none; display: none; background: url(http://api0.map.bdimg.com/images/blank.gif);" title="">
            
        </span>
        </div>
        <div style="position: absolute; height: 0px; width: 0px; left: 0px; top: 0px; z-index: 600;">
            
        </div>
        <div style="position: absolute; height: 0px; width: 0px; left: 0px; top: 0px; z-index: 500;">
        <label class="BMapLabel" unselectable="on" style="position: absolute; display: none; cursor: inherit; border: 1px solid rgb(190, 190, 190); padding: 1px; white-space: nowrap; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 12px; line-height: normal; font-family: arial, sans-serif; z-index: -20000; color: rgb(190, 190, 190); background-color: rgb(190, 190, 190);">
        shadow
        </label>
        <label class="BMapLabel" unselectable="on" style="position: absolute; display: none; cursor: inherit; border: 1px solid rgb(140, 140, 140); padding: 1px; white-space: nowrap; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 12px; line-height: normal; font-family: arial, sans-serif; z-index: 80; -webkit-user-select: none; color: rgb(77, 77, 77); background-color: rgb(255, 255, 225);">
        点击可查看详情
        </label>
        </div>
        <div style="position: absolute; height: 0px; width: 0px; left: 0px; top: 0px; z-index: 400;">
        <span class="BMap_Marker" unselectable="on" style="position: absolute; padding: 0px; margin: 0px; border: 0px; width: 0px; height: 0px; left: 950px; top: 225px; z-index: -6945250;">
        <div style="position: absolute; margin: 0px; padding: 0px; width: 19px; height: 25px; overflow: hidden;">
        <img src="images/marker_red_sprite.png" style="display: block; border:none;margin-left:0px; margin-top:0px; "></div></span>
        <span class="BMap_Marker" unselectable="on" style="position: absolute; padding: 0px; margin: 0px; border: 0px; width: 0px; height: 0px; left: 575px; top: 106px; z-index: 19000000; display: none;">
        <div style="position: absolute; margin: 0px; padding: 0px; width: 18px; height: 18px; overflow: hidden;">
        <img src="images/spotmkrs.png" style="display: block; border:none;margin-left:-232px; margin-top:-208px; ">
        </div>
        </span>
        </div>
        <div style="position: absolute; height: 0px; width: 0px; left: 0px; top: 0px; z-index: 300;">
        <span unselectable="on" style="position: absolute; padding: 0px; margin: 0px; border: 0px; width: 20px; height: 11px; left: 954px; top: 239px;">
        <div style="position: absolute; margin: 0px; padding: 0px; width: 20px; height: 11px; overflow: hidden;">
        <img src="images/marker_red_sprite.png" style="display: block; border:none;margin-left:-19px; margin-top:-13px; ">
        </div>
        </span>
        </div>
        <div style="position: absolute; height: 0px; width: 0px; left: 0px; top: 0px; z-index: 201;">
            
        </div>
        <div style="position: absolute; height: 0px; width: 0px; left: 0px; top: 0px; z-index: 200;">
            
        </div>
        </div>
        <div style="position: absolute; overflow: visible; top: 0px; left: 0px; z-index: 1;">
        <div style="position: absolute; overflow: visible; z-index: -100; left: 951px; top: 214px; display: block; transform: translate3d(0px, 0px, 0px);">
        <img src="__PUBLIC__/home/ditu/other/tile" style="position: absolute; border: none; width: 256px; height: 256px; left: -116px; top: -211px; max-width: none; opacity: 1;">
        <img src="__PUBLIC__/home/ditu/other/tile(1)" style="position: absolute; border: none; width: 256px; height: 256px; left: 140px; top: -211px; max-width: none; opacity: 1;">
        <img src="__PUBLIC__/home/ditu/other/tile(2)" style="position: absolute; border: none; width: 256px; height: 256px; left: -372px; top: -211px; max-width: none; opacity: 1;">
        <img src="__PUBLIC__/home/ditu/other/tile(3)" style="position: absolute; border: none; width: 256px; height: 256px; left: -116px; top: -467px; max-width: none; opacity: 1;">
        <img src="__PUBLIC__/home/ditu/other/tile(4)" style="position: absolute; border: none; width: 256px; height: 256px; left: -116px; top: 45px; max-width: none; opacity: 1;">
        <img src="__PUBLIC__/home/ditu/other/tile(5)" style="position: absolute; border: none; width: 256px; height: 256px; left: 396px; top: -211px; max-width: none; opacity: 1;">
        <img src="__PUBLIC__/home/ditu/other/tile(6)" style="position: absolute; border: none; width: 256px; height: 256px; left: -628px; top: -211px; max-width: none; opacity: 1;">
        <img src="__PUBLIC__/home/ditu/other/tile(7)" style="position: absolute; border: none; width: 256px; height: 256px; left: -372px; top: 45px; max-width: none; opacity: 1;">
        <img src="__PUBLIC__/home/ditu/other/tile(8)" style="position: absolute; border: none; width: 256px; height: 256px; left: 140px; top: 45px; max-width: none; opacity: 1;">
        <img src="__PUBLIC__/home/ditu/other/tile(9)" style="position: absolute; border: none; width: 256px; height: 256px; left: 140px; top: -467px; max-width: none; opacity: 1;">
        <img src="__PUBLIC__/home/ditu/other/tile(10)" style="position: absolute; border: none; width: 256px; height: 256px; left: -372px; top: -467px; max-width: none; opacity: 1;">
        <img src="__PUBLIC__/home/ditu/other/tile(11)" style="position: absolute; border: none; width: 256px; height: 256px; left: -884px; top: -211px; max-width: none; opacity: 1;">
        <img src="__PUBLIC__/home/ditu/other/tile(12)" style="position: absolute; border: none; width: 256px; height: 256px; left: 652px; top: -211px; max-width: none; opacity: 1;">
        <img src="__PUBLIC__/home/ditu/other/tile(13)" style="position: absolute; border: none; width: 256px; height: 256px; left: -628px; top: -467px; max-width: none; opacity: 1;">
        <img src="__PUBLIC__/home/ditu/other/tile(14)" style="position: absolute; border: none; width: 256px; height: 256px; left: 396px; top: -467px; max-width: none; opacity: 1;">
        <img src="__PUBLIC__/home/ditu/other/tile(15)" style="position: absolute; border: none; width: 256px; height: 256px; left: -628px; top: 45px; max-width: none; opacity: 1;">
        <img src="__PUBLIC__/home/ditu/other/tile(16)" style="position: absolute; border: none; width: 256px; height: 256px; left: 396px; top: 45px; max-width: none; opacity: 1;">
        <img src="__PUBLIC__/home/ditu/other/tile(17)" style="position: absolute; border: none; width: 256px; height: 256px; left: 908px; top: -211px; max-width: none; opacity: 1;">
        <img src="__PUBLIC__/home/ditu/other/tile(18)" style="position: absolute; border: none; width: 256px; height: 256px; left: -1140px; top: -211px; max-width: none; opacity: 1;">
        <img src="__PUBLIC__/home/ditu/other/tile(19)" style="position: absolute; border: none; width: 256px; height: 256px; left: -884px; top: 45px; max-width: none; opacity: 1;">
        <img src="__PUBLIC__/home/ditu/other/tile(20)" style="position: absolute; border: none; width: 256px; height: 256px; left: 652px; top: 45px; max-width: none; opacity: 1;">
        <img src="__PUBLIC__/home/ditu/other/tile(21)" style="position: absolute; border: none; width: 256px; height: 256px; left: -884px; top: -467px; max-width: none; opacity: 1;">
        <img src="__PUBLIC__/home/ditu/other/tile(22)" style="position: absolute; border: none; width: 256px; height: 256px; left: 652px; top: -467px; max-width: none; opacity: 1;">
        <img src="__PUBLIC__/home/ditu/other/tile(23)" style="position: absolute; border: none; width: 256px; height: 256px; left: -1140px; top: 45px; max-width: none; opacity: 1;">
        <img src="__PUBLIC__/home/ditu/other/tile(24)" style="position: absolute; border: none; width: 256px; height: 256px; left: 908px; top: 45px; max-width: none; opacity: 1;">
        <img src="__PUBLIC__/home/ditu/other/tile(25)" style="position: absolute; border: none; width: 256px; height: 256px; left: -1140px; top: -467px; max-width: none; opacity: 1;">
        <img src="__PUBLIC__/home/ditu/other/tile(26)" style="position: absolute; border: none; width: 256px; height: 256px; left: 908px; top: -467px; max-width: none; opacity: 1;">
        </div>
        </div>
        <div style="position: absolute; overflow: visible; top: 0px; left: 0px; z-index: 2; display: none;">
        <div style="position: absolute; overflow: visible; top: 0px; left: 0px; z-index: 0; display: none;">
            
        </div>
        </div>
        <div style="position: absolute; overflow: visible; top: 0px; left: 0px; z-index: 3;">
            
        </div>
        </div>
        <div class="pano_close" title="退出全景" style="z-index: 1201; display: none;"></div>
        <a class="pano_pc_indoor_exit" title="退出室内景" style="z-index: 1201; display: none;">
        <span style="float:right;margin-right:12px;">出口</span>
        </a>
        <div class=" anchorBL" style="height: 32px; position: absolute; z-index: 30; bottom: 0px; right: auto; top: auto; left: 1px;">
        <a title="到百度地图查看此区域" target="_blank" href="http://map.baidu.com/?sr=1" style="outline: none;">
        <img style="border:none;width:77px;height:32px" src="images/copyright_logo.png">
        </a>
        </div>
        <div id="zoomer" style="position:absolute;z-index:0;top:0px;left:0px;overflow:hidden;visibility:hidden;cursor:url(http://api0.map.bdimg.com/images/openhand.cur) 8 8,default">
        <div class="BMap_zoomer" style="top:0;left:0;">
            
        </div>
        <div class="BMap_zoomer" style="top:0;right:0;">
            
        </div>
        <div class="BMap_zoomer" style="bottom:0;left:0;">
            
        </div>
        <div class="BMap_zoomer" style="bottom:0;right:0;">
            
        </div>
        </div>
        
        </div>
        <script type="text/javascript">

            // 百度地图API功能   

			

            var map = new BMap.Map('allmap');

            map.addEventListener("click",function(e){
                var jing_du_value = e.point.lng ;
                var wei_du_value =  e.point.lat;
                $.ajax({
                	url:'/home/goods/address/d_api',
                	data:{'jing':jing_du_value,'wei':wei_du_value},
                	type:'post',
                	dataType:'json',
                	success:function(mes){
                		console.log(mes);
                		var result = $(mes).attr('result');
                		console.log($(mes).attr('result'));
                		console.log($(result).attr('address'));
                		$('#address-company').val($(result).attr('address'));
                		$('#jingdu').val($(result).attr('lng'));
                		$('#weidu').val($(result).attr('lat'));
                	}
                });
            	var poi = new BMap.Point(jing_du_value,wei_du_value);

                  var acc = new BMap.Marker(poi); //创建marker对象

		            // acc.enableDragging(); //marker可拖拽


		            map.addOverlay(acc); //在地图中添加marker

		            acc.addEventListener("click", function(ent){

		                // searchInfoWindow.open(acc);
		                // alert(ent);
		                this.remove();
		                $('#address-company').val('');
                		$('#jingdu').val('');
                		$('#weidu').val('');
		                ent.stopPropagation();
						return false;

		            })
					window.onload = function() { searchInfoWindow.open(acc); };//页面加载时弹框
					e.stopPropagation();
					return false;

            });

            var poi = new BMap.Point(116.405237,39.912543);

            map.centerAndZoom(poi, 4);

            map.enableScrollWheelZoom();

        

            // var content = '<div style="margin:0;line-height:20px;padding:2px;line-height:30px;">' +

            //                 '<img src="images/LOGO.jpg" alt="" style="float:right;zoom:1;overflow:hidden;width:100px;height:100px;margin-left:3px;"/>' +

            //                 '地址：河南省郑州市二七区航海中路鼎盛时代<br/>电话：0371-63362935' +

            //               '</div>';

        // var content = null;

            //创建检索信息窗口对象

            // var searchInfoWindow = null;

            // searchInfoWindow = new BMapLib.SearchInfoWindow(map, content, {

            //         title  : "",      //标题

            //         width  : 290,             //宽度

            //         height : 105,              //高度

            //         panel  : "panel",         //检索结果面板

            //         enableAutoPan : true,     //自动平移

            //         searchTypes   :[

            //             BMAPLIB_TAB_SEARCH,   //周边检索

            //             BMAPLIB_TAB_TO_HERE,  //到这里去

            //             BMAPLIB_TAB_FROM_HERE //从这里出发

            //         ]

            //     });

            // var marker = new BMap.Marker(poi); //创建marker对象

            // marker.enableDragging(); //marker可拖拽

            // marker.addEventListener("click", function(e){

            //     searchInfoWindow.open(marker);

            // })

            // map.addOverlay(marker); //在地图中添加marker

			window.onload = function() { searchInfoWindow.open(marker); };//页面加载时弹框

			

			var myStyleJson=[{

							"featureType": "land",

							"elementType": "geometry.fill",

				}];

				

			map.setMapStyle({styleJson: myStyleJson });	  

        </script>


    </div>



    </div>



</section>


    <span id="span_form" style="display:none">
                    <form id="my_form" action="/home/goods/address/insert" method="post">
               <div class="clear"></div>
               <p class="form-row columned">
                  <label for="address-company">家庭住址<span class="required">*</span></label>
                  <input type="text" class="input-text" readOnly='readOnly' name="zhuzhi" id="address-company" placeholder="家庭住址" value="" />
               	  <input id="jingdu" type="hidden" name="jingdu" value="">
               	  <input id="weidu" type="hidden" name="weidu" value="">
               </p>
               <p class="form-row columned">
                  <label for="address-email">住址备注: <span class="required">*</span></label>
                  <input type="text" class="input-text" name="zhuzhizhushi" id="address-email" placeholder="you@yourdomain.com" value="" />
               </p>
               <div class="clear"></div>
               <p class="form-row form-row-first">
                  <label for="address-city">姓名: <span class="required">*</span></label>
                  <input type="text" class="input-text" name="name" id="address-city" placeholder="姓名" value="" />
               </p>
               <p class="form-row form-row-last">
                  <label for="address-postcode">电话: <span class="required">*</span></label>
                  <input type="text" class="input-text" name="phone" id="address-postcode" placeholder="11位电话号码" value="" />
               </p>
               
               <div class="clear"></div>
              	<input type="submit" class="button" info="tijiao" value="添加地址" />
                <input type="reset" id="res" style="display:none">
                <a href="" class="button" info="shouqi">↑&nbsp;&nbsp;收起</a>
            </form>
            </span>
         </div>

         <div id="comments">
            <!--<p class="nocomments">&nbsp;</p>-->
         </div>
         <!-- #comments -->
      <!-- END CONTENT -->
      <!-- START SIDEBAR -->
      <div id="sidebar" class="group">
         <div id="featured-products-3" class="widget-1 widget-first widget widget_featured_products">
            <h3>Must Haves</h3>
            <ul class="product_list_widget">
            <foreach name="addr" item="addr1">
               <li>
               <a href="/home/goods/detail/index/id/{$addr1.id}" title="Interior Black">
               <img width="36" height="36" src="{$addr1.zpic}" class="attachment-shop_tiny wp-post-image" alt="interior" title="interior" />
               <span class="js_widget_product_title">{$addr1.goods_name}</span></a><span class="js_widget_product_price">&#36;{$addr1.goods_price}.00</span>
               </li>
            </foreach>
            </ul>
         </div>
         <div id="testimonial-widget-3" class="widget-2 widget-last widget testimonial-widget">
            <h3>Testimonials</h3>
            <div class="testimonial-text">
               <ul>
                  <li>
                     <blockquote>
                        <p>Quisque vel ipsum nec magna aliquet molestie in quis ipsum. Sed nisl est, hendrerit in laoreet facilisis, placerat eget tortor. Nunc ipsum eros, sagittis quis dignissim sed, imperdiet vitae sem. Praesent et ultricies tellus. Etiam ornare dolor sagittis quis dignissim sed, imperdiet vitae sem. Praesent et ultricies tellus.</p>
                        <a class="name-testimonial" href="testimonials.html">[Joy Mèrgot ]</a>
                     </blockquote>
                  </li>
                  <li>
                     <blockquote>
                        <p>Duis bibendum massa in felis auctor at pellentesque nulla consequat. Duis ornare elementum nisl quis semper. <strong>In consequat tortor</strong> odio, quis iaculis metus. Phasellus neque ipsum, volutpat molestie pellentesque dapibus, dapibus molestie libero</p>
                        <a class="name-testimonial" href="testimonials.html">[Elisa Meis ]</a>
                     </blockquote>
                  </li>
                  <li>
                     <blockquote>
                        <p>Nunc egestas magna luctus mauris ultricies vitae fermentum lectus faucibus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Mauris et augue suscipit est ultricies gravida. Phasellus sollicitudin scelerisque pellentesque. Mauris et augue suscipit!</p>
                        <a class="name-testimonial" href="testimonials.html">[Ricardo Mori ]</a>
                     </blockquote>
                  </li>
               </ul>
               <div class="pagination p-testimonial"></div>
            </div>
            <script type="text/javascript">
               jQuery(document).ready(function($){
                   $('.testimonial-widget ul').cycle({
                       fx:'fade',
                       
                       timeout:8000,
                       speed:300, 
               	    pager:'.p-testimonial'
                   });
               });
                $('a[info="tianjia"]').click(function(){
                    $(this).css('display','none');
                    $('input[type="submit"]').val('添加地址');
                    $('input[name="id"]').remove();
                    $('input[name="jingdu"]').val('');
                    $('input[name="weidu"]').val('');
                    $('#res').click();
                    $('#my_form').attr('action','/home/goods/address/insert');
                    $('.lx_center1').slideDown('1000');
                    $('#span_form').slideDown('1000');
                    return false;
                });
                $('a.[info="shouqi"]').click(function(){
                    $('.lx_center1').slideUp('1000');
                    $('#span_form').css('display','none');
                    setTimeout(function(){
                        $('a[info="tianjia"]').css('display','block');
                    },1000);
                    return false;
                });
                $('a.[info="moren"]').click(function(){
                    var id=$(this).attr('aid');
                    var a = $(this);
                    $.ajax({
                        url:'/home/goods/address/status',
                        type:'post',
                        data:{'id':id},
                        success:function(mes){
                            console.log(mes);
                            if(mes=='yes'){
                                $('a.[info="moren"]').css('display','block');
                                $('img[info="moren"]').css('display','none');
                                $(a).css('display','none');
                                $(a).next().css('display','block');
                            }
                        }
                    });
                    return false;
                });
                $('img[status="1"]').css('display','block');
                $('img[status="1"]').prev().css('display','none');
                $('a[info="xiugai"]').click(function(){
                    $('a[info="tianjia"]').css('display','none');
                    $('.lx_center1').slideDown('1000');
                    $('#span_form').slideDown('1000');
                    $('input[type="submit"]').val('修改地址');
                    $('#my_form').attr('action','/home/goods/address/update');
                    $('input[name="name"]').val($(this).parent().prevAll().eq('4').html());
                    $('input[name="zhuzhi"]').val($(this).parent().prevAll().eq('3').html());
                    $('input[name="zhuzhizhushi"]').val($(this).parent().prevAll().eq('2').html());
                    $('input[name="phone"]').val($(this).parent().prevAll().eq('1').html());
                    $('input[name="jingdu"]').val($(this).attr('jingdu'));
                    $('input[name="weidu"]').val($(this).attr('weidu'));
                    var id = $('<input type="hidden" name="id" value="'+$(this).attr('aid')+'">');
                    $('input[name="weidu"]').after(id);
                    return false;
                });
                $('a[info="shanchu"]').click(function(){
                    var id = $(this).attr('aid');
                    var tr = $(this).parent().parent();
                    $.ajax({
                        url:'/home/goods/address/del',
                        data:{'id':id},
                        type:'post',
                        success:function(mes){
                            if(mes=='yes'){
                                tr.remove();
                            }else{
                                alert('删除失败,请刷新页面后重试');
                            }
                        }
                    });
                    return false;
                });
                $('input[info="tijiao"]').click(function(){
                    var name1 = $('input[name="name"]').val();
                    var zhuzhi = $('input[name="zhuzhi"]').val();
                    var zhuzhizhushi = $('input[name="zhuzhizhushi"]').val();
                    var phone = $('input[name="phone"]').val();
                    if(!name1){
                        alert('姓名不能你为空');
                        return false;
                    }
                    if(!zhuzhi){
                        alert('住址不能为空');
                        return false;
                    }
                    if(!zhuzhizhushi){
                        alert('住址注释不能为空');
                        return false;
                    }
                    if(!phone){
                        alert('电话号码不能为空');
                        return false;
                    }
                    return true;
                });
            </script>
         </div>
      </div>
      <!-- END SIDEBAR -->    
   </div>
   <!-- START EXTRA CONTENT -->
   <!-- END EXTRA CONTENT -->    
</div>
</block>